class Staff < ActiveRecord::Base
  belongs_to :shop, :autosave => true
  validates :firstname, :length => {:within => 3..30}
  validates :lastname, :length => {:within => 3..30}
  validates :phone, :numericality => true, :length => {:within => 7..12}
  validates :mobile, :numericality => true, :length => {:within => 7..12}
  validates :email, :length => {:within => 3..50}
  validates :jobtitle, :length => {:within => 3..40}
  validates_inclusion_of :status, :in => %w[banned approved]
end
